﻿using System;
using OneMG.Phoenix.Entity;
using OneMG.Phoenix.Respository;
using IBatisNet.DataMapper;
using OneMG.Phoenix.Kernel.IBatisUtil;

namespace OneMG.Phoenix.IBatisRepository
{
    public class AdminUserRightRepository : BaseIBatisDao,IAdminUserRight
    {
        public AdminUserRightRepository()
            : base("yihaoke_newMap.Config")
        {

        }
        public System.Int32 AddAdminUserRight(EAdminUserRight entity)
        {
			string stmtId = "AdminUserRightMap.InsertAdminUserRight";
			 Object obj = base.SqlMapper.Insert(stmtId, entity);
			 return (System.Int32)obj;
        }
        
		public  EAdminUserRight GetByAdminUserRightID (System.Int32 adminUserRightID)
        {
			string stmtId = "AdminUserRightMap.SelectByAdminUserRightID";
			return base.SqlMapper.QueryForObject<EAdminUserRight>(stmtId, adminUserRightID);
        }
        
        public  void DeleteByAdminUserRightID (System.Int32 adminUserRightID)
        {
			string stmtId = "AdminUserRightMap.DeleteByAdminUserRightID";
			base.SqlMapper.Update(stmtId, adminUserRightID);
        }
        
        public  void UpdateByAdminUserRightID (EAdminUserRight entity)
        {
			string stmtId = "AdminUserRightMap.UpdateByAdminUserRightID";
			base.SqlMapper.Update(stmtId, entity);
        }

    }
}

